package com.sfh.story;

import java.io.File;
import java.util.ArrayList;
import java.util.List;

import com.sfh.story.entrty.StoryContent;
import com.sfh.story.entrty.StoryDetil;
import com.sfh.story.entrty.StoryType;

import cn.bmob.v3.Bmob;
import cn.bmob.v3.BmobObject;
import cn.bmob.v3.datatype.BmobFile;
import cn.bmob.v3.listener.SaveListener;
import android.app.Activity;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.EditText;
import android.widget.Toast;

public class MainActivity extends Activity
{
    EditText et;
    @Override
    protected void onCreate(Bundle savedInstanceState)
    {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        Bmob.initialize(this, "6409cd608f6c50a8bd5773345caea25b");
        et = (EditText)findViewById(R.id.et);
        
        findViewById(R.id.bt_1).setOnClickListener(new OnClickListener()
        {
            
            @Override
            public void onClick(View v)
            {
                Intent intent = new Intent(MainActivity.this, StotyList.class);
                intent.putExtra(StotyList.KEY, "http://www.gsdaquan.com/erjiye/th_list.asp?f_id=37&Page=" +et.getText().toString());
                intent.putExtra(StotyList.TYPE, 1);
                startActivity(intent);
            }
        });
        
        findViewById(R.id.bt_2).setOnClickListener(new OnClickListener()
        {
            
            @Override
            public void onClick(View v)
            {
                // http://www.gsdaquan.com/erjiye/th_list.asp?f_id=10&Page=2  
                Intent intent = new Intent(MainActivity.this, StotyList.class);
                intent.putExtra(StotyList.KEY, "http://www.gsdaquan.com/erjiye/th_list.asp?f_id=10&Page=" +et.getText().toString());
                intent.putExtra(StotyList.TYPE, 2);
                startActivity(intent);
            }
        });
        
        findViewById(R.id.bt_3).setOnClickListener(new OnClickListener()
        {
            
            @Override
            public void onClick(View v)
            {
                Intent intent = new Intent(MainActivity.this, StotyList.class);
                intent.putExtra(StotyList.KEY, "http://www.gsdaquan.com/erjiye/th_list.asp?f_id=13&Page=" +et.getText().toString());
                intent.putExtra(StotyList.TYPE, 3);
                startActivity(intent);
            }
        });
        
        findViewById(R.id.bt_4).setOnClickListener(new OnClickListener()
        {
            
            @Override
            public void onClick(View v)
            {
                Intent intent = new Intent(MainActivity.this, StotyList.class);
                intent.putExtra(StotyList.KEY, "http://www.gsdaquan.com/erjiye/th_list.asp?f_id=11&Page=" +et.getText().toString());
                intent.putExtra(StotyList.TYPE, 4);
                startActivity(intent);
            }
        });
        findViewById(R.id.bt_5).setOnClickListener(new OnClickListener()
        {
            
            @Override
            public void onClick(View v)
            {
                Intent intent = new Intent(MainActivity.this, StotyList.class);
                intent.putExtra(StotyList.TYPE, 5);
                intent.putExtra(StotyList.KEY, "http://www.gsdaquan.com/erjiye/th_list.asp?f_id=34&Page=" +et.getText().toString());
                startActivity(intent);
            }
        });
        
    }
    
}
